#region Using Directives

using System;
using System.Drawing;

#endregion

namespace Web.Google
{
    public class SolidFill : Fill
    {
        #region Constructors

        public SolidFill()
        {
        }

        public SolidFill(FillType type, Color color)
        {
            Type = type;
            Color = color;
        }

        #endregion

        #region Properties

        public Color Color
        {
            get
            {
                object o = ViewState["Color"];
                return o == null ? Color.Empty : (Color)o;
            }
            set { ViewState["Color"] = value; }
        }

        #endregion

        #region Methods

        public override string ToString()
        {
            return String.Format("{0},s,{1}", EnumHelper.GetEnumDescription(Type), ColorHelper.ColorToHexString(Color));
        }

        public override int GetHashCode()
        {
            return ToString().GetHashCode();
        }

        #endregion
    }
}